import request from '@/utils/request'

// 查询客户提现记录列表
export function listCrmCompanyWithdraw(query) {
  return request({
    url: '/net/crmCompanyWithdraw/list',
    method: 'get',
    params: query
  })
}

// 查询客户提现记录详细
export function getCrmCompanyWithdraw(id) {
  return request({
    url: '/net/crmCompanyWithdraw/' + id,
    method: 'get'
  })
}

// 审批通过
export function approvePass(id) {
  return request({
    url: '/net/crmCompanyWithdraw/approve/pass/' + id,
    method: 'get'
  })
}

// 审批拒绝
export function approveRefuse(id) {
  return request({
    url: '/net/crmCompanyWithdraw/approve/refuse/' + id,
    method: 'get'
  })
}

// 标记打款
export function approvePayed(data) {
  return request({
    url: '/net/crmCompanyWithdraw/approve/payed',
    method: 'post',
    data: data
  })
}


// 新增客户提现记录
export function addCrmCompanyWithdraw(data) {
  return request({
    url: '/net/crmCompanyWithdraw',
    method: 'post',
    data: data
  })
}

// 修改客户提现记录
export function updateCrmCompanyWithdraw(data) {
  return request({
    url: '/net/crmCompanyWithdraw',
    method: 'put',
    data: data
  })
}

// 删除客户提现记录
export function delCrmCompanyWithdraw(id) {
  return request({
    url: '/net/crmCompanyWithdraw/' + id,
    method: 'delete'
  })
}
